/*
	chooserName -- sample XFCN to return the chooser name
	10 Oct 1988 Greg Jorgensen, Mac DTS
	© Apple Computer Inc., 1988
	
	Gets the chooser name from the System file STR -16096 resource
	
	THIS CODE IS NOT SUPPORTED BY APPLE COMPUTER
	It may not work with future releases.
	May be distributed free of charge.
*/

#include <HyperXCmd.h>

/* **** WARNING:  DO NOT USE GLOBAL VARIABLES! **** */

pascal void main(paramPtr)
	XCmdBlockPtr	paramPtr;
{
	int	saveResFile;
	Handle theHndl;

	saveResFile = CurResFile();				/* save the current res file id */
	UseResFile(0);							/* point to System file */
	theHndl = GetResource('STR ', -16096);	/* get the resource */
	if (theHndl) {
		DetachResource(theHndl);			/* take resource from resource mgr */
		PtoCstr(*theHndl);					/* change to C-string in place */
	}
	UseResFile(saveResFile);				/* reset to saved res file */
	paramPtr->returnValue = theHndl;		/* stuff result for Hypercard */
}

#include "XCmdGlue.inc.c"

